<!DOCTYPE html>
<html lang="en">
<head>
    <title>绩效考核配置清单</title>
    <meta http-equiv="pragma" content="no-cache">
    <meta http-equiv="Cache-Control" content="no-store, must-revalidate">
    <meta http-equiv="expires" content="Wed, 26 Feb 1997 08:21:57 GMT">
    <meta http-equiv="expires" content="-1">
    <meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <link rel="shortcut icon" href="/dist/img/icon.png" type="image/x-icon">
    <!-- Bootstrap 3.3.6 -->
    <link rel="stylesheet" href="/dist/plugins/bootstrap/css/bootstrap.min.css">
    <!--字体-->
    <link rel="stylesheet" href="/dist/css/font-awesome.min.css">
    <!--图标-->
    <link rel="stylesheet" href="/dist/css/ionicons.min.css">
    <!--插件样式-->
    <link href="/dist/plugins/ztree/css/zTreeStyle/zTreeStyle.css" rel="stylesheet"/>
    <!--OA主样式-->
    <link rel="stylesheet" href="/dist/css/OA.min.css?t=4a6c1b54">
    <link rel="stylesheet" href="/dist/css/skins/OA-skins.min.css?t=16f1e6f3">
    <style>
        .moduleName {
            height: 28px;
            line-height: 28px;
            font-size: 22px;
            border-bottom: 1px solid #ddd;
            text-align: left;

        }

        .tryStyle {
            width: 30px;
            height: 14px;
            line-height: 14px;
            font-size: 12px;
            /* top: 0; */
            right: 0;
            position: absolute;
            border-radius: 5px;
            margin-top: 1px;
            background: red;
            color: #fff;
            margin-right: -2px;
            transform: scale(0.8);
        }

        .nav-tabs-custom {
            padding: 10px 0;
            margin-bottom: 0;
            box-shadow: none;
            position: relative;
            overflow: hidden;

        }

        .infoReport {
            display: flex;
            justify-content: flex-start;
            text-align: left;
            margin-left: 10px;
        }

        .infoReport div {
            margin: 0 10px;
        }

        .lineOne {
            text-align: left;
        }

        .lineOne span {
            max-height: 20px;
            line-height: 20px;
            overflow: hidden;
            text-overflow: ellipsis;
            display: -webkit-box;
            -webkit-box-orient: vertical;
            -webkit-line-clamp: 1;
            text-align: left;
        }

        .lineOneNoMore {
            text-align: left;
        }

        .lineOneNoMore span {
            max-height: 20px;
            line-height: 20px;
            overflow: hidden;
            text-overflow: ellipsis;
            display: -webkit-box;
            -webkit-box-orient: vertical;
            -webkit-line-clamp: 1;
            text-align: left;
        }

        .mScrollBox {
            float: left;
            position: relative;
        }

        .imgStyle {
            width: 300px;
            height: 400px;
        }

        .div-td-content-more {
            position: absolute;
            height: auto;
            z-index: 999;
            line-height: 20px;
            background-color: #d3e8fd;
            padding: 8px 6px;
            border: 1px solid #e8e8ea;
            display: none;
        }

        .div-td-content-more i {
            width: 15px;
            height: 12px;
            background: url("/dist/img/more-icon.png");
            position: absolute;
            left: 50px;
            top: -12px;
        }

        .templateStyle {
            border: 1px solid #ddd;
            margin-bottom: 10px;
            padding: 0 10px;

        }

        .table > thead > tr > th {
            padding: 0;
        }

        .table > tbody > tr > td {
            position: relative;
        }
    </style>
</head>
<body>
<section class="content" id="app">
    <div class="div-td-content-more"><i></i></div>
    <div class="row">
        <div class="col-md-2" id="inboxGroup" id="divLeft">
            <div class="box-body no-padding box-border iframeH" style="overflow: auto;background: #f7f8fa;">
                <ul class="ztree" id="ztree"></ul>
            </div>
        </div>
        <div class="col-md-10">
            <div class="templateStyle iframeH">
                <template v-if="openTemplate!='company'">
                    <div class="nav-tabs-custom">
                        <div class="moduleName">团队组建配置清单</div>
                    </div>
                    <table class="table table-bordered text-center table-width" style="width: 60%;">
                        <thead>
                        <tr>
                            <th style="width: 20%;"></th>
                            <th style="width: 20%;">标配人数</th>
                            <th style="width: 20%;">罚款</th>
                        </tr>
                        </thead>
                        <tbody>
                        <tr>
                            <td>总经理</td>
                            <td class="td-tanZongStyle">
                                <input type="text" />
                                <span style="color: #46A4FF;position:absolute;right:10px;top: 4px;">人</span>
                            </td>
                            <td class="td-tanZongStyle">
                                <input type="text" />
                                <span style="color: #46A4FF;position:absolute;right:14px;top: 4px;">元/天</span>
                            </td>
                        </tr>
                        <tr>
                            <td>销售总监</td>
                            <td class="td-tanZongStyle">
                                <input type="text" />
                                <span style="color: #46A4FF;position:absolute;right:10px;top: 4px;">人</span>
                            </td>
                            <td class="td-tanZongStyle">
                                <input type="text" />
                                <span style="color: #46A4FF;position:absolute;right:14px;top: 4px;">元/天</span>
                            </td>
                        </tr>
                        <tr>
                            <td>区域总监</td>
                            <td class="td-tanZongStyle">
                                <input type="text" />
                                <span style="color: #46A4FF;position:absolute;right:10px;top: 4px;">人</span>
                            </td>
                            <td class="td-tanZongStyle">
                                <input type="text" />
                                <span style="color: #46A4FF;position:absolute;right:14px;top: 4px;">元/天</span>
                            </td>
                        </tr>
                        <tr>
                            <td>大区经理</td>
                            <td class="td-tanZongStyle">
                                <input type="text" />
                                <span style="color: #46A4FF;position:absolute;right:10px;top: 4px;">人</span>
                            </td>
                            <td class="td-tanZongStyle">
                                <input type="text" />
                                <span style="color: #46A4FF;position:absolute;right:14px;top: 4px;">元/天</span>
                            </td>
                        </tr>
                        <tr>
                            <td>区域经理</td>
                            <td class="td-tanZongStyle">
                                <input type="text" />
                                <span style="color: #46A4FF;position:absolute;right:10px;top: 4px;">人</span>
                            </td>
                            <td class="td-tanZongStyle">
                                <input type="text" />
                                <span style="color: #46A4FF;position:absolute;right:14px;top: 4px;">元/天</span>
                            </td>
                        </tr>
                        <tr>
                            <td colspan="3" style="text-align: left;">备注：区域经理、大区经理参与团队组建考核，少于标配人数按每天罚款</td>
                        </tr>
                        </tbody>
                    </table>
                    <div class="operate" style="display: flex;justify-content: center;">
                        <input type="button" id="save1" class="btn btn-primary btn-sm" value="保存" style="margin-top: 5px;width:60px;height: 30px;margin-right: 5px;">
                    </div>
                </template>
                <template v-else>
                    <div class="nav-tabs-custom">
                        <div class="moduleName">绩效考核配置清单</div>
                    </div>
                    <table class="table table-bordered text-center table-width">
                        <thead>
                        <tr>
                            <th style="width: 14.3%"></th>
                            <th style="width: 14.3%">考核周期</th>
                            <th style="width: 14.3%">销售目标</th>
                            <th style="width: 14.3%;">奖(小型)</th>
                            <th style="width: 14.3%;">奖(中型)</th>
                            <th style="width: 14.3%;">奖(大型)</th>
                            <th style="width: 14.3%;">罚</th>
                        </tr>
                        </thead>
                        <tbody>
                            <tr>
                                <td>总经理</td>
                                <td class="td-tanZongStyle">
                                    <input type="text" />
                                    <span style="color: #46A4FF;position:absolute;left:130px;top: 4px;">月</span>
                                </td>
                                <td class="td-tanZongStyle">
                                    <input type="text" />
                                    <span style="color: #46A4FF;position:absolute;left:130px;top: 4px;">台</span>
                                </td>
                                <td class="td-tanZongStyle">
                                    <input type="text" />
                                    <span style="color: #46A4FF;position:absolute;left:110px;top: 4px;">元/台</span>
                                </td>
                                <td class="td-tanZongStyle">
                                    <input type="text" />
                                    <span style="color: #46A4FF;position:absolute;left:110px;top: 4px;">元/台</span>
                                </td>
                                <td class="td-tanZongStyle">
                                    <input type="text" />
                                    <span style="color: #46A4FF;position:absolute;left:110px;top: 4px;">元/台</span>
                                </td>
                                <td class="td-tanZongStyle">
                                    <input type="text" />
                                    <span style="color: #46A4FF;position:absolute;left:110px;top: 4px;">元/台</span>
                                </td>
                            </tr>
                            <tr>
                                <td>销售总监</td>
                                <td class="td-tanZongStyle">
                                    <input type="text" />
                                    <span style="color: #46A4FF;position:absolute;left:130px;top: 4px;">月</span>
                                </td>
                                <td class="td-tanZongStyle">
                                    <input type="text" />
                                    <span style="color: #46A4FF;position:absolute;left:130px;top: 4px;">台</span>
                                </td>
                                <td class="td-tanZongStyle">
                                    <input type="text" />
                                    <span style="color: #46A4FF;position:absolute;left:110px;top: 4px;">元/台</span>
                                </td>
                                <td class="td-tanZongStyle">
                                    <input type="text" />
                                    <span style="color: #46A4FF;position:absolute;left:110px;top: 4px;">元/台</span>
                                </td>
                                <td class="td-tanZongStyle">
                                    <input type="text" />
                                    <span style="color: #46A4FF;position:absolute;left:110px;top: 4px;">元/台</span>
                                </td>
                                <td class="td-tanZongStyle">
                                    <input type="text" />
                                    <span style="color: #46A4FF;position:absolute;left:110px;top: 4px;">元/台</span>
                                </td>
                            </tr>
                            <tr>
                                <td>区域总监</td>
                                <td class="td-tanZongStyle">
                                    <input type="text" />
                                    <span style="color: #46A4FF;position:absolute;left:130px;top: 4px;">月</span>
                                </td>
                                <td class="td-tanZongStyle">
                                    <input type="text" />
                                    <span style="color: #46A4FF;position:absolute;left:130px;top: 4px;">台</span>
                                </td>
                                <td class="td-tanZongStyle">
                                    <input type="text" />
                                    <span style="color: #46A4FF;position:absolute;left:110px;top: 4px;">元/台</span>
                                </td>
                                <td class="td-tanZongStyle">
                                    <input type="text" />
                                    <span style="color: #46A4FF;position:absolute;left:110px;top: 4px;">元/台</span>
                                </td>
                                <td class="td-tanZongStyle">
                                    <input type="text" />
                                    <span style="color: #46A4FF;position:absolute;left:110px;top: 4px;">元/台</span>
                                </td>
                                <td class="td-tanZongStyle">
                                    <input type="text" />
                                    <span style="color: #46A4FF;position:absolute;left:110px;top: 4px;">元/台</span>
                                </td>
                            </tr>
                            <tr>
                                <td>大区经理</td>
                                <td class="td-tanZongStyle">
                                    <input type="text" />
                                    <span style="color: #46A4FF;position:absolute;left:130px;top: 4px;">月</span>
                                </td>
                                <td class="td-tanZongStyle">
                                    <input type="text" />
                                    <span style="color: #46A4FF;position:absolute;left:130px;top: 4px;">台</span>
                                </td>
                                <td class="td-tanZongStyle">
                                    <input type="text" />
                                    <span style="color: #46A4FF;position:absolute;left:110px;top: 4px;">元/台</span>
                                </td>
                                <td class="td-tanZongStyle">
                                    <input type="text" />
                                    <span style="color: #46A4FF;position:absolute;left:110px;top: 4px;">元/台</span>
                                </td>
                                <td class="td-tanZongStyle">
                                    <input type="text" />
                                    <span style="color: #46A4FF;position:absolute;left:110px;top: 4px;">元/台</span>
                                </td>
                                <td class="td-tanZongStyle">
                                    <input type="text" />
                                    <span style="color: #46A4FF;position:absolute;left:110px;top: 4px;">元/台</span>
                                </td>
                            </tr>
                            <tr>
                                <td>区域经理</td>
                                <td class="td-tanZongStyle">
                                    <input type="text" />
                                    <span style="color: #46A4FF;position:absolute;left:130px;top: 4px;">月</span>
                                </td>
                                <td class="td-tanZongStyle">
                                    <input type="text" />
                                    <span style="color: #46A4FF;position:absolute;left:130px;top: 4px;">台</span>
                                </td>
                                <td class="td-tanZongStyle">
                                    <input type="text" />
                                    <span style="color: #46A4FF;position:absolute;left:110px;top: 4px;">元/台</span>
                                </td>
                                <td class="td-tanZongStyle">
                                    <input type="text" />
                                    <span style="color: #46A4FF;position:absolute;left:110px;top: 4px;">元/台</span>
                                </td>
                                <td class="td-tanZongStyle">
                                    <input type="text" />
                                    <span style="color: #46A4FF;position:absolute;left:110px;top: 4px;">元/台</span>
                                </td>
                                <td class="td-tanZongStyle">
                                    <input type="text" />
                                    <span style="color: #46A4FF;position:absolute;left:110px;top: 4px;">元/台</span>
                                </td>
                            </tr>
                            <tr><td colspan="7" style="text-align: left;">备注：考核周期内根据销售目标完成情况进行奖惩和罚款</td></tr>
                        </tbody>
                    </table>
                    <div class="operate" style="display: flex;justify-content: center;">
                        <input type="button" id="save" class="btn btn-primary btn-sm" value="保存" style="margin-top: 5px;width:60px;height: 30px;margin-right: 5px;">
                    </div>
                </template>

            </div>
        </div>
    </div>
</section>
<script src="https://file.ggxqce.com/web/jquery-2.2.3.min.js"></script>
<!--插件JS-->
<script src="https://file.ggxqce.com/web/bootstrap.min.js"></script>
<!--框架已定义 JS-->
<script src="/dist/js/app_iframe.js?t=8e743a31"></script>
<!--oa自定义  JS-->
<script src="/dist/js/oa.js?t=54c6b89c"></script>
<script src="https://file.ggxqce.com/web/vue.min.js"></script>
<script type="text/javascript" src="/dist/plugins/My97DatePicker/WdatePicker.js"></script>
<script type="text/javascript" src="/dist/plugins/lhgdialog/lhgdialog.min.js?self=true"></script>
<!--ztree组件所需js-->
<script type="text/javascript" src="/dist/plugins/ztree/js/jquery.ztree.all-3.5.min.js"></script>
<script type="text/javascript" src="/dist/plugins/ztree/js/jquery.ztree.exhide-3.5.js"></script>
<script type="text/javascript">
    var zTreeCallback = {
        showIcon: function (treeeId, treeNode) {
            return treeNode.isParent;
        },
        onClick: function (event, treeId, treeNode) {
            app.selectNode=treeNode;
            console.log(treeNode)
            if (treeNode.type == "company") {
                app.openTemplate="company"
            }else if(treeNode.type == "region"){
                app.openTemplate="region"
            }
        },
        beforeClick:function (treeId, treeNode, clickFlag) {
            if(treeNode.level==0){
                return false;
            }
        }
    };
    var zTreeSetting = {
        view: {
            showIcon: zTreeCallback.showIcon
        },
        data: {
            simpleData: {
                enable: true
            },
            keep: {
                parent: true
            }
        },
        callback: {
            onClick: zTreeCallback.onClick,
            beforeClick:zTreeCallback.beforeClick
        }
    };

</script>
<script type="text/javascript">
    var app = new Vue({
        el: '#app',
        data: {
            target:{
                id:""
            },
            openTemplate:"company",
            selectNode:{}

        },
        methods: {
            //获取树
            getTreeData:function () {
                var that=this;
                $.wyui.postMethod(urlConfig.system.region.getTreeNodes, {}, function (nodes) {
                    console.log(nodes);
                    that.treeObj = $.fn.zTree.init($("#ztree"), zTreeSetting, nodes);
                    var treeObj = $.fn.zTree.getZTreeObj("ztree");
                    var nodes = treeObj.getNodes();
                    console.log(nodes)
                    if (nodes[0].children[0].children[0]) {
                        treeObj.selectNode(nodes[0].children[0].children[0]);
                        that.companyId=nodes[0].children[0].children[0].id;
                    }
                });
            },
        },

        mounted: function () {
            var that=this;
            that.getTreeData();
        }
    });

</script>
</body>